﻿namespace NBpn.Cfg {
    using System;
    using System.Collections.Generic;
    using Network;

    public class Configuration {
        private Layer input;
        private IList<Layer> hiddenLayers = new List<Layer>();
        private Layer output;

        public void AddNeuron(int layer, INeuron neuron) {
        }

        public void AddInputNeuron(INeuron neuron) {
        }

        public void AddOutputNeuron(INeuron neuron) {
        }


        public void AddInputLinealNeuron(double input) {
        }

        public void AddNeuronSigmoidalNeuronAtLayer(int layer) {
        }

        public void AddOutputSigmoidalNeuronAtLayer() {
        }

        public Bpn BuildNetwork() {
            return null;
        }

        public void AddInputLinealNeuron() {
        }

        public void SetGlobalError(double d) {
        }

        public void SetPatterns(IList<Pattern> patterns) {
        }

        public void AddNeuronsAtInput(int i) {
            throw new System.NotImplementedException();
        }

        public void AddHiddenNeuronsAt(int layer, int neurons,Type type) {
            
            Layer hiddenLayer = new Layer();

            for (int i = 0; i < neurons; i++) {
                hiddenLayer.Add((Neuron)Activator.CreateInstance(type));
            }
            
            hiddenLayers.Add(hiddenLayer);
        }

        public void AddHiddenNeuronsAt<T>(int layer, int neurons) {
                AddHiddenNeuronsAt(layer,neurons,typeof(T));
        }

        public void AddNeuronsAtOutput(int neurons, Type type) {
            for (int i = 0; i < neurons; i++) {
                output.Add((Neuron)Activator.CreateInstance(type));
            }
        }


        public void SetMomentRate(double d) {
            throw new System.NotImplementedException();
        }

        public void SetLearningRate(double d) {
            

        }

        public void SetPatternError(double d) {
            throw new System.NotImplementedException();
        }
    }
}